package io.xccit.order.feign;

import io.xccit.model.product.domain.Product;
import io.xccit.order.feign.fallback.ProductClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author CH_ywx
 * @version 1.0
 * @create 2025/5/24
 * <p>商品远程调用接口客户端</p>
 */
@FeignClient(name = "service-product",fallback = ProductClientFallBack.class)
public interface ProductFeignClient {

    /**
     * 根据id查询商品信息
     * @param id
     * @return
     */
    @GetMapping("/product/{id}")
    Product getProductById(@PathVariable("id") Long id);
}
